home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
os2
/
commo70.zip
/
SAMPLES.MAC
< prev
next >
Wrap
Text File
|
1996-08-24
|
11KB
|
288 lines
┌───────────────────────────┐
│ Additional Macro Examples │
└───────────────────────────┘
This file contains a number of sample macros. They may need to be modified to
work for you. Feel free to copy any of them to COMMO.MAC or to an auxiliary
Macro File.
Macros used with external Zmodem drivers
───────────────────────────────────────────────────────────────────────────
For OMEN Technology programs, add the following macros at the top of COMMO.MAC
(if necessary, substitute "dsz.com" or "dsz.exe" for "gsz.exe"):
{:z_recv}
{exec-d %protodir\gsz.exe portx %_pad,%_irq ha both rz -mr %pr_down}
{call ring_alarm} {retu}
{:z_send}
{exec-d %protodir\gsz.exe portx %_pad,%_irq ha both sz -mr %pr_file}
{call ring_alarm} {retu}
For TEXAS Zmodem, add the following:
{:z_recv}
{exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -r %pr_down}
{call ring_alarm} {retu}
{:z_send}
{exec-d %protodir\txzm.exe -c%_pad,%_irq -l%_spe -b%_mod -h -q -s %pr_file}
{call ring_alarm} {retu}
For other Zmodem drivers, adapt the program's command line to create macros
similar to the above.
Exit {COMMO} with prompt (safe exit)
───────────────────────────────────────────────────────────────────────────
{:alx} {info-qs0 Really exit?}
{ifco ,alxn} {exit} {:alxn} {}
Generic login macro
───────────────────────────────────────────────────────────────────────────
My generic login macro will login to most popular BBS's. The generic login
subroutine can be called from mail run macros, etc. The GOLOok with
";passwor" ignores the string "password" in the opening instructions on an
Auntie board. Put {login} in your Dialing Directory macro field.
{:login} {capture y,c:\commo\commo.cap} RBBS, PCBoard, Auntie, etc.
{asci ,} {call gls} {}
Generic login subroutine
───────────────────────────────────────────────────────────────────────────
{:gls} {setlook 60,hng,10,|}
{setv ss_r,~|} {setv ss_yr,~y|}
{:li1} {sslo ss_r,(enter)} {sslo ss_yr,graphics (enter)}
{calo li1,li2,first name} {calo li1,li3,last name}
{sslo ss_yr,is this correct} {golo li1,;passwor}
{lookfor password} {send ~%_pas|} {return}
{:li2} {send ~Firstname|} {return}
{:li3} {send ~Lastname|} {return}
Start mail reader after a mail run
───────────────────────────────────────────────────────────────────────────
{:cf3} {exec-ns slmr} {} SLMR Reader w/swap
Macros used at session termination
───────────────────────────────────────────────────────────────────────────
These two utilities are used in various macros. "hng" will hangup when
necessary, then "nocar" will wait for carrier detect to drop and continue
dialing numbers that are still marked.
{:hng} {pause 3} {hangup y}
{:nocar} {pause 1} {ifcarrier nocar} {pause 5} {dial ,} {beep} {}
PCBoard generic mailrun
───────────────────────────────────────────────────────────────────────────
Here is a macro using variables to do a mail run on a PCBoard with CAM-Mail,
Rosemail, QMail, etc. It will download only one packet each day and upload a
reply packet if one exists (deleting the packet if the upload is successful),
then log off.
This macro should be placed in a separate Macro File. E.g., PCBMAIL.MAC.
Five variables must be set prior to starting this macro. For convenience,
these can be set in the Dialing Directory entry. For example, to call Channel
1 and use the CAM-Mail door, the Dialing Directory entry (all on one line!)
would be:
Channel1 11/06/94 {1 617 354 5776} {password} ...
... {start,pcbmail.mac} {} {bbsid,channel1} {opendoor,mail} ...
... {maildoor,cam-mail} {nomsgs,no new messages} {ptim,3}
When a connection is made, {COMMO} will load PCBMAIL.MAC and GOTO the label
"start". If nodes are labeled "Channel11", "Channel12", etc., they will all
be UNMArked when the macro starts.
{:start}
{setv ss_r,~|} Variables for SSLOoks
{setv ss_y,~y} (These may be defined in COMMO.SET
{setv ss_yr,~y|} using "set" items. Then they can
{setv ss_n,~n} be used in other macros, too.)
{setv ss_nr,~n|}
{setv ss_c,~c}
{setv ss_ee,~~~~^[~^[}
{unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
{setv qwkfil,c:\slmr\store\%bbsid.qwk}
{capm filter}
{capt y,c:\cap\%bbsid.%_day} {asci ,}
{setl 30,hng}
{sslo ss_ee,press escape}
{sslo ss_ee,<esc> twice}
{golo ,pcboard (r)}
{look ^g}
{call gls}
{setl 60,hng,%ptim,n|}
{sslo ss_r,to continue}
{sslo ss_nr,(enter)=yes?}
{sslo ss_nr,(H)elp, More?}
{sslo ss_c,(C)ontinue}
{golo ,channel 1 command?}
{look main board command?}
{setl 120,hng} ** turn off prompt timer
{send open %opendoor|}
{look %maildoor command}
{file %qwkfil} {ifco ,mr_dl}
{comp _ffd,%_dat} {ifco mr_ul} ** only one .QWK per day
{:mr_dl}
{send d|}
{golo mr_ul,%nomsgs} {sslo ss_yr,when done?}
{sslo ss_yr,(y/n)} {sslo ss_yr,receive these}
{look %bbsid.qwk}
{call mail_dn} {look %maildoor command}
{ifex %qwkfil,,mr_dl} ** if error, try again
{:mr_ul}
{ifex %uldir\%bbsid.rep,,mr_gb} ** if reply, upload it
{send u|} {look %bbsid.rep} {call mail_up}
{look %maildoor command} {ifcon ,mr_ul} ** if error, try again
{:mr_gb}
{send g|} {goto hng}
WildCat! generic mailrun
───────────────────────────────────────────────────────────────────────────
The following macro does a mail run on most WildCat! BBS's with the wcMAIL
mail door. The only variables that need to be set are "bbsid" and "ptim."
The "ss_" variables may be set in the Setup File (using the "set" keyword).
This macro should be placed in a separate Macro File. E.g., CATMAIL.MAC.
{:catmail}
{setv ss_ee,~^[^[}
{setv ss_r,~|}
{setv ss_y,~y} ** These assume "hotkeys" are set
{setv ss_n,~n}
{setv ss_bday,~mm-dd-yy|} <- your birthdate
{setv ss_pnum,~614-326-1309|} <- your phone number
{setv ss_name,~First Last|} <- your name
{unmark %bbsid%1,%bbsid%2,%bbsid%3,%bbsid%4,%bbsid%5}
{setv qwkfil,c:\slmr\store\%bbsid.qwk}
{capm filter}
{capt y,c:\cmsg\%bbsid.%_day} {asci ,}
{setl 60,hng}
{sslo ss_ee,twice}
{sslo ss_r,[c]ontinue}
{sslo ss_name,first name}
{look password?} {send %_pas|}
{setl 120,hng,%ptim,|}
{sslo ss_r,[c]ontinue}
{sslo ss_r,[enter]}
{sslo ss_n,choice? [ ]}
{sslo ss_bday,birth date}
{sslo ss_pnum,phone number}
{sslo ss_n,bulletin menu?}
{golo ,push a key} ** Various main menu prompts
{golo ,your command}
{look main menu:} {send ~~m}
{golo ,push a key} ** Various message menu prompts
{golo ,your command}
{look message menu:} {send ~~d}
{:wc_md}
{setl 120,hng} ** turn off prompt timer
{sslo ss_r,[c]ontinue}
{golo ,tomcat menu}
{look wcmail command}
{file %qwkfil} {ifco ,wc_dl}
{comp _ffd,%_dat} {ifco wc_ul} ** only one .QWK per day
{:wc_dl}
{pause 1} {send d}
{golo wc_ul,nothing found}
{sslo ss_y,receive this packet}
{look %bbsid.qwk now}
{call mail_dn}
{golo ,tomcat menu}
{look wcmail command}
{ifex %qwkfil,,wc_dl} ** if error, try again
{exec-n c:\slmr\weldel.bat %bbsid} ** delete welcome, etc.
{:wc_ul}
{ifex %uldir\%bbsid.rep,,wc_bye} ** if reply, upload it
{pause 1} {send u}
{look %bbsid.rep} {call mail_up}
{golo ,tomcat menu}
{look w